import { defineFakeRoute } from 'vite-plugin-fake-server/client';
import { get, post } from '../BaseMock';

const dictTypeByStatusReturn = (req) => {
  let dictData = [];
  dictData['sys_normal_disable'] = {
    msg: '操作成功',
    code: 200,
    data: [
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:21',
        updateBy: null,
        updateTime: null,
        remark: '正常状态',
        dictCode: 6,
        dictSort: 1,
        dictLabel: '正常',
        dictValue: '0',
        dictType: 'sys_normal_disable',
        cssClass: '',
        listClass: 'primary',
        isDefault: 'Y',
        status: '0',
        default: true
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:21',
        updateBy: null,
        updateTime: null,
        remark: '停用状态',
        dictCode: 7,
        dictSort: 2,
        dictLabel: '停用',
        dictValue: '1',
        dictType: 'sys_normal_disable',
        cssClass: '',
        listClass: 'danger',
        isDefault: 'N',
        status: '0',
        default: false
      }
    ]
  };
  dictData['sys_user_sex'] = {
    msg: '操作成功',
    code: 200,
    data: [
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:20',
        updateBy: null,
        updateTime: null,
        remark: '性别男',
        dictCode: 1,
        dictSort: 1,
        dictLabel: '男',
        dictValue: '0',
        dictType: 'sys_user_sex',
        cssClass: '',
        listClass: '',
        isDefault: 'Y',
        status: '0',
        default: true
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:20',
        updateBy: null,
        updateTime: null,
        remark: '性别女',
        dictCode: 2,
        dictSort: 2,
        dictLabel: '女',
        dictValue: '1',
        dictType: 'sys_user_sex',
        cssClass: '',
        listClass: '',
        isDefault: 'N',
        status: '0',
        default: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:20',
        updateBy: null,
        updateTime: null,
        remark: '性别未知',
        dictCode: 3,
        dictSort: 3,
        dictLabel: '未知',
        dictValue: '2',
        dictType: 'sys_user_sex',
        cssClass: '',
        listClass: '',
        isDefault: 'N',
        status: '0',
        default: false
      }
    ]
  };
  dictData['sys_show_hide'] = {
    msg: '操作成功',
    code: 200,
    data: [
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:21',
        updateBy: null,
        updateTime: null,
        remark: '显示菜单',
        dictCode: 4,
        dictSort: 1,
        dictLabel: '显示',
        dictValue: '0',
        dictType: 'sys_show_hide',
        cssClass: '',
        listClass: 'primary',
        isDefault: 'Y',
        status: '0',
        default: true
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:21',
        updateBy: null,
        updateTime: null,
        remark: '隐藏菜单',
        dictCode: 5,
        dictSort: 2,
        dictLabel: '隐藏',
        dictValue: '1',
        dictType: 'sys_show_hide',
        cssClass: '',
        listClass: 'danger',
        isDefault: 'N',
        status: '0',
        default: false
      }
    ]
  };
  dictData['sys_yes_no'] = {
    msg: '操作成功',
    code: 200,
    data: [
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:23',
        updateBy: null,
        updateTime: null,
        remark: '系统默认是',
        dictCode: 12,
        dictSort: 1,
        dictLabel: '是',
        dictValue: 'Y',
        dictType: 'sys_yes_no',
        cssClass: '',
        listClass: 'primary',
        isDefault: 'Y',
        status: '0',
        default: true
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:23',
        updateBy: null,
        updateTime: null,
        remark: '系统默认否',
        dictCode: 13,
        dictSort: 2,
        dictLabel: '否',
        dictValue: 'N',
        dictType: 'sys_yes_no',
        cssClass: '',
        listClass: 'danger',
        isDefault: 'N',
        status: '0',
        default: false
      }
    ]
  };
  dictData['sys_notice_status'] = {
    msg: '操作成功',
    code: 200,
    data: [
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:24',
        updateBy: null,
        updateTime: null,
        remark: '正常状态',
        dictCode: 16,
        dictSort: 1,
        dictLabel: '正常',
        dictValue: '0',
        dictType: 'sys_notice_status',
        cssClass: '',
        listClass: 'primary',
        isDefault: 'Y',
        status: '0',
        default: true
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:24',
        updateBy: null,
        updateTime: null,
        remark: '关闭状态',
        dictCode: 17,
        dictSort: 2,
        dictLabel: '关闭',
        dictValue: '1',
        dictType: 'sys_notice_status',
        cssClass: '',
        listClass: 'danger',
        isDefault: 'N',
        status: '0',
        default: false
      }
    ]
  };
  dictData['sys_notice_type'] = {
    msg: '操作成功',
    code: 200,
    data: [
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:23',
        updateBy: null,
        updateTime: null,
        remark: '通知',
        dictCode: 14,
        dictSort: 1,
        dictLabel: '通知',
        dictValue: '1',
        dictType: 'sys_notice_type',
        cssClass: '',
        listClass: 'warning',
        isDefault: 'Y',
        status: '0',
        default: true
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:23',
        updateBy: null,
        updateTime: null,
        remark: '公告',
        dictCode: 15,
        dictSort: 2,
        dictLabel: '公告',
        dictValue: '2',
        dictType: 'sys_notice_type',
        cssClass: '',
        listClass: 'success',
        isDefault: 'N',
        status: '0',
        default: false
      }
    ]
  };
  dictData['sys_oper_type'] = {
    msg: '操作成功',
    code: 200,
    data: [
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:24',
        updateBy: null,
        updateTime: null,
        remark: '新增操作',
        dictCode: 19,
        dictSort: 1,
        dictLabel: '新增',
        dictValue: '1',
        dictType: 'sys_oper_type',
        cssClass: '',
        listClass: 'info',
        isDefault: 'N',
        status: '0',
        default: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:25',
        updateBy: null,
        updateTime: null,
        remark: '修改操作',
        dictCode: 20,
        dictSort: 2,
        dictLabel: '修改',
        dictValue: '2',
        dictType: 'sys_oper_type',
        cssClass: '',
        listClass: 'info',
        isDefault: 'N',
        status: '0',
        default: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:25',
        updateBy: null,
        updateTime: null,
        remark: '删除操作',
        dictCode: 21,
        dictSort: 3,
        dictLabel: '删除',
        dictValue: '3',
        dictType: 'sys_oper_type',
        cssClass: '',
        listClass: 'danger',
        isDefault: 'N',
        status: '0',
        default: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:25',
        updateBy: null,
        updateTime: null,
        remark: '授权操作',
        dictCode: 22,
        dictSort: 4,
        dictLabel: '授权',
        dictValue: '4',
        dictType: 'sys_oper_type',
        cssClass: '',
        listClass: 'primary',
        isDefault: 'N',
        status: '0',
        default: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:25',
        updateBy: null,
        updateTime: null,
        remark: '导出操作',
        dictCode: 23,
        dictSort: 5,
        dictLabel: '导出',
        dictValue: '5',
        dictType: 'sys_oper_type',
        cssClass: '',
        listClass: 'warning',
        isDefault: 'N',
        status: '0',
        default: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:26',
        updateBy: null,
        updateTime: null,
        remark: '导入操作',
        dictCode: 24,
        dictSort: 6,
        dictLabel: '导入',
        dictValue: '6',
        dictType: 'sys_oper_type',
        cssClass: '',
        listClass: 'warning',
        isDefault: 'N',
        status: '0',
        default: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:26',
        updateBy: null,
        updateTime: null,
        remark: '强退操作',
        dictCode: 25,
        dictSort: 7,
        dictLabel: '强退',
        dictValue: '7',
        dictType: 'sys_oper_type',
        cssClass: '',
        listClass: 'danger',
        isDefault: 'N',
        status: '0',
        default: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:26',
        updateBy: null,
        updateTime: null,
        remark: '生成操作',
        dictCode: 26,
        dictSort: 8,
        dictLabel: '生成代码',
        dictValue: '8',
        dictType: 'sys_oper_type',
        cssClass: '',
        listClass: 'warning',
        isDefault: 'N',
        status: '0',
        default: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:26',
        updateBy: null,
        updateTime: null,
        remark: '清空操作',
        dictCode: 27,
        dictSort: 9,
        dictLabel: '清空数据',
        dictValue: '9',
        dictType: 'sys_oper_type',
        cssClass: '',
        listClass: 'danger',
        isDefault: 'N',
        status: '0',
        default: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:24',
        updateBy: null,
        updateTime: null,
        remark: '其他操作',
        dictCode: 18,
        dictSort: 99,
        dictLabel: '其他',
        dictValue: '0',
        dictType: 'sys_oper_type',
        cssClass: '',
        listClass: 'info',
        isDefault: 'N',
        status: '0',
        default: false
      }
    ]
  };
  dictData['sys_common_status'] = {
    msg: '操作成功',
    code: 200,
    data: [
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:27',
        updateBy: null,
        updateTime: null,
        remark: '正常状态',
        dictCode: 28,
        dictSort: 1,
        dictLabel: '成功',
        dictValue: '0',
        dictType: 'sys_common_status',
        cssClass: '',
        listClass: 'primary',
        isDefault: 'N',
        status: '0',
        default: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:27',
        updateBy: null,
        updateTime: null,
        remark: '停用状态',
        dictCode: 29,
        dictSort: 2,
        dictLabel: '失败',
        dictValue: '1',
        dictType: 'sys_common_status',
        cssClass: '',
        listClass: 'danger',
        isDefault: 'N',
        status: '0',
        default: false
      }
    ]
  };
  dictData['sys_job_group'] = {
    msg: '操作成功',
    code: 200,
    data: [
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:22',
        updateBy: null,
        updateTime: null,
        remark: '默认分组',
        dictCode: 10,
        dictSort: 1,
        dictLabel: '默认',
        dictValue: 'DEFAULT',
        dictType: 'sys_job_group',
        cssClass: '',
        listClass: '',
        isDefault: 'Y',
        status: '0',
        default: true
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:22',
        updateBy: null,
        updateTime: null,
        remark: '系统分组',
        dictCode: 11,
        dictSort: 2,
        dictLabel: '系统',
        dictValue: 'SYSTEM',
        dictType: 'sys_job_group',
        cssClass: '',
        listClass: '',
        isDefault: 'N',
        status: '0',
        default: false
      }
    ]
  };
  dictData['sys_job_status'] = {
    msg: '操作成功',
    code: 200,
    data: [
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:22',
        updateBy: null,
        updateTime: null,
        remark: '正常状态',
        dictCode: 8,
        dictSort: 1,
        dictLabel: '正常',
        dictValue: '0',
        dictType: 'sys_job_status',
        cssClass: '',
        listClass: 'primary',
        isDefault: 'Y',
        status: '0',
        default: true
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:28:22',
        updateBy: null,
        updateTime: null,
        remark: '停用状态',
        dictCode: 9,
        dictSort: 2,
        dictLabel: '暂停',
        dictValue: '1',
        dictType: 'sys_job_status',
        cssClass: '',
        listClass: 'danger',
        isDefault: 'N',
        status: '0',
        default: false
      }
    ]
  };
  let urlParam = req.params['id'];
  return dictData[urlParam];
};
export default defineFakeRoute([
  get('/system/dict/data/type/:id', dictTypeByStatusReturn)
]);
